<%-- 
    Document   : ViewDetailRealEstate
    Created on : Nov 16, 2011, 5:24:02 PM
    Author     : home
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="Admin.Model.RealEstate,java.util.ArrayList" %>
<%@page  import="Admin.DAO.RealEstateDAO" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" media="screen, projection" href="menu.css" />
        <link rel="stylesheet" type="text/css" media="screen, projection" href="style.css" />
        <title>View Detail Real Estate</title>
    </head>
    <body>
         <div class="wrap1">
  <div class="wrap2">
                <div class="logo" style="height: 110px; padding-top:  0px; ">
                    <img src="img/logo.png"/> My Sweet Home ltd.
                </div>
    <div id="menu">
      <div class="menu">
        <ul>
          <li><span class="hlavny_"><a href="index.jsp">Home</a></span></li>
          <li><img src="img/divider2.png" alt="" /></li>
          <li><span class="hlavny_"><a href="ViewRealEstate.jsp">Real Estate</a></span></li>
          <li><img src="img/divider2.png" alt="" /></li>
          <li><span class="hlavny_"><a href="viewSeller.jsp">User</a></span></li>
          <li><img src="img/divider2.png" alt="" /></li>
          <li><span class="hlavny_"><a href="ViewPostHistory.jsp" >Post Histories</a></span></li>
          <li><img src="img/divider2.png" alt="" /></li>
          <li><span class="hlavny_"><a href="ViewBank.jsp">Banks</a></span></li>
          <li><img src="img/divider2.png" alt="" /></li>
          <li><span class="hlavny_"><a href="ViewDirectory.jsp">Directories</a></span></li>
          <li><img src="img/divider2.png" alt="" /></li>
          <li><span class="hlavny_"><a href="ViewFAQs.jsp">FAQ</a></span></li>
          <li><img src="img/divider2.png" alt="" /></li>
          <li><span class="hlavny_"><a href="ViewFeedback.jsp">Feedback</a></span></li>
        </ul>
      </div>
      <div class="info">
         <%
                if (request.getSession().getAttribute("admin") != null) {
                    String userEmail = request.getSession().getAttribute("admin").toString();
                    out.print("<h4 style=\"color:#FF3300\">Welcome, "+userEmail + "  <a href=\"../Logout\" onclick=\" return confirm('Are u sure?')\" > Logout </a></h4>  ");
                } else {
                    response.sendRedirect("adminLogin.jsp");
                }

        %>
      </div>
      <div class="leftpanel">
          <div class="mn_header_left"></div>
        <div class="mn_header_center">Admin Management</div>
        <div class="mn_header_right"></div>
        <div class="mn_content_center"><a href="ViewBank.jsp"><br/>&nbsp; &nbsp; View Bank</a></div>
         <div class="mn_content_right"></div>
        <div class="mn_content_center"><a href="ViewBankLoan.jsp"><br/>&nbsp; &nbsp; Bank Loan</a></div>
         <div class="mn_content_right"></div>
        <div class="mn_content_center"><a href="ViewDirectory.jsp"><br/>&nbsp; &nbsp; View Directory</a></div>
        <div class="mn_content_right"></div>
        <div class="mn_content_center"><a href="ViewPostHistory.jsp"><br/>&nbsp; &nbsp; Post History</a></div>
        <div class="mn_content_right"></div>
        <div class="mn_content_center"><a href="ViewRealEstate.jsp"><br/>&nbsp; &nbsp; Real Estate</a></div>
        <div class="mn_content_right"></div>
        <div class="mn_content_center"><a href="ViewFAQs.jsp"><br/>&nbsp; &nbsp; FAQ</a></div>
        <div class="mn_content_right"></div>

        <div class="mn_footer_left"></div>
        <div class="mn_footer_content"></div>
        <div class="mn_footer_right"></div>
<!--        <div class="header">Admin Management</div>
        <ul id="categories">
          <li><a href="ViewBank.jsp">View Bank</a></li>
          <li><a href="ViewBankLoan.jsp">View Bank Loan</a></li>
          <li><a href="ViewDirectory.jsp">View Directory</a></li>
          <li><a href="ViewPostHistory.jsp">View Post History</a></li>
          <li><a href="ViewRealEstate.jsp">View Real Estate</a></li>
          <li><a href="ViewFAQs.jsp">View FAQ</a></li>
        </ul>-->

      </div>
      <div id="content">
                    <div id="ad_header_left"></div>
                    <div id="ad_header_center"></div>
                    <div id="ad_header_right"></div>
                    <div class="ad_content_center">
                        
           <%
                            RealEstateDAO realestateDao = new RealEstateDAO();
                        if (request.getParameter("realEstateID") != null) {
                            RealEstate realEstate = null;
                            int realEstateID = Integer.parseInt(request.getParameter("realEstateID"));
                            realEstate = realestateDao.GetByID(realEstateID);
                            if(realEstate!=null){
                    %>

                    <table width="500" align="center" border="0" style="padding-top: 10px">

                        <tr>
                            <td width="150" height="397" valign="top">
                                <img src="Imgs/realEstate_Imgs/<%=realEstate.getRealEstateImage() %>" width="150" height="200" />
                            </td>
                            <td width="540" valign="top"><table width="100%" border="0"  cellspacing="3">
                                    <tr>
                                        <td colspan="2" height="30" align="center"><span style="color: white;"><%=realEstate.getRealEstateTitle() %></span></td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" height="30" align="left">
                                             <u><span style="color:darkorange;">Real Estate Information</span></u>
                                            <br/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="30%"  height="23"><span style="color: white;">City:</span></td>
                                        <td width="70%" ><span style="color: white;"><%=realEstate.getCity() %></span></td>
                                    </tr>
                                    <tr>
                                        <td  height="23"><span style="color: white;">Street:</span></td>
                                        <td ><span style="color: white;"><%=realEstate.getStreet() %></span></td>
                                    </tr>
                                    <tr>
                                        <td  height="23"><span style="color: white;">Price:</span></td>
                                        <td ><span style="color: white;"><%=realEstate.getPrice() %>.000 VND</span></td>
                                    </tr>
                                    <tr>
                                        <td  height="23"><span style="color: white;">NoOfBedrooms:</span></td>
                                        <td ><span style="color: white;"><%=realEstate.getNoOfBedrooms() %></span></td>
                                    </tr>
                                    <tr>
                                        <td  height="23"><span style="color: white;">NoOfBathrooms:</span></td>
                                        <td ><span style="color: white;"><%=realEstate.getNoOfBathrooms() %></span></td>
                                    </tr>
                                    <tr>
                                        <td  height="23"><span style="color: white;">Type:</span></td>
                                        <td ><span style="color: white;"><%=realEstate.getRealEstateTypeID() %></span></td>
                                    </tr>
                                    <tr>
                                        <td  height="23"><span style="color: white;">Area: </span></td>
                                        <td ><span style="color: white;"><%=realEstate.getArea() %> m2</span></td>
                                    </tr>
                                    <tr>
                                        <td  height="23"><span style="color: white;">Orientation:</span></td>
                                        <td ><span style="color: white;"><%=realEstate.getOrientation() %></span></td>
                                    </tr>
                                    <tr>
                                        <td  height="23"><span style="color: white;">ExtraFacilitiesAvailable:</span></td>
                                        <td ><span style="color: white;"><%=realEstate.getExtraFacilitiesAvailable() %></span></td>
                                    </tr>
                                    <tr>
                                        <td  height="23"><span style="color: white;">ModesOfTransport:</span></td>
                                        <td ><span style="color: white;"><%=realEstate.getModesOfTransport() %></span></td>
                                    </tr>
                                    <tr>
                                        <td  height="23"><span style="color: white;">WithFurniture:</span></td>
                                        <td ><span style="color: white;"><%=realEstate.getWithFurniture() %></span></td>
                                    </tr>
                                    <tr>
                                        <td  height="23"><span style="color: white;">ModeOfPayment:</span></td>
                                        <td ><span style="color: white;"><%=realEstate.getModeOfPayment() %></span></td>
                                    </tr>
                                    <tr>
                                        <td  height="23"><span style="color: white;">Deposit:</span></td>
                                        <td ><span style="color: white;"><%=realEstate.getDeposit() %>.000 VND</span></td>
                                    </tr>
                                    <tr>
                                        <td  height="23"><span style="color: white;">Negotiable:</span></td>
                                        <td ><span style="color: white;"><%=realEstate.getNegotiable() %></span></td>
                                    </tr>
                                    <tr>
                                        <td  height="23"><span style="color: white;">Description:</span></td>
                                        <td ><span style="color: white;"><%=realEstate.getDescription() %></span></td>
                                    </tr>
                                    <tr>
                                        <td  height="23"><span style="color: white;">Stype:</span></td>
                                        <td  ><span style="color: white;"><%=realEstate.getRealEstateStyleID() %></span></td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" height="30" align="left">
                                            <a href="ViewRealEstate.jsp">Back</a>
                                            <br/>
                                        </td>
                                    </tr>
                                </table></td>
                        </tr>
                    </table>
                    <%
                            }}
                            %>
                   
                    </div>
                    <div id="ad_footer_left"></div>
                    <div id="ad_footer_center"></div>
                    <div id="ad_footer_right"></div>
                </div>

                <div class="cleaner_with_height"> </div>
                <div class="text_"> <strong>My Sweet Home ltd.</strong><br />
                    <br />
                    212 Military Parkway<br />
                    Los Angeles, CA 94043  Telephone: +421 903 000 000<br />
                    E-mail: e-mail@domain.com<br />
                    ICQ: 000-000-000<br />
                    Skype: corporation1<br />
                    <br />
                </div>

      
    </div>
    </div>
               <div class="info1" style="height: 80px;">
                <div style="display:inline; float:left;">&copy; 2011 <a href="index.jsp"> mysweethome.com</a>. Design by <a href="">Group 106 </a>.</div>
      <div style="display:inline; float:right;"><a href="http://aptech.vn">Ha Noi - Aptech</a></div>
            </div>
  </div>
    </body>
</html>
